-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create App for Scope using fullscreen #76
base: production
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phenomenal job here! No blocking comments, just a few nitpicks. Keep up the great work!
(This is definitely an applet I wanted to see! Honestly, I thought if I just had the scope applet active on both sides, the left scope would merge with the right scope and the left CV1 would just forward the information to the right scope and they'd be able to display full screen. Obviously that's not the case, so I'm glad we've got someone working on this 💯 )
void OnLeftButtonLongPress() { | ||
|
||
} | ||
|
||
void OnRightButtonPress() { | ||
} | ||
|
||
void OnUpButtonPress() { | ||
} | ||
|
||
void OnDownButtonPress() { | ||
} | ||
|
||
void OnDownButtonLongPress() { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these methods have to be defined in order to prevent null references down the line? Or is it just common practice in this repo to define all the possible event handlers?
// void DrawTicks() { | ||
// gfxPrint(40, 1, sample_ticks); | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Please remove any commented out code or uncomment this if it's needed.
If this has to stay, please leave a comment on why it's commented out and when it should be uncommented.
int v = (cv * 100) / (12 << 7); | ||
bool neg = v < 0 ? 1 : 0; | ||
if (v < 0) v = -v; | ||
int wv = v / 100; // whole volts | ||
int dv = v - (wv * 100); // decimal | ||
gfxPrint(neg ? "-" : "+"); | ||
gfxPrint(wv); | ||
gfxPrint("."); | ||
if (dv < 10) gfxPrint("0"); | ||
gfxPrint(dv); | ||
gfxPrint("V"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Could you get some formatting done in here? Obviously it's of zero importance in the grand scheme of things, but readability is king 👑
void BigScope_handleButtonEvent(const UI::Event &event) { | ||
// For left encoder, handle press and long press | ||
if (event.control == OC::CONTROL_BUTTON_L) { | ||
if (event.type == UI::EVENT_BUTTON_LONG_PRESS) BigScope_instance.OnLeftButtonLongPress(); | ||
else BigScope_instance.OnLeftButtonPress(); | ||
} | ||
|
||
// For right encoder, only handle press (long press is reserved) | ||
if (event.control == OC::CONTROL_BUTTON_R && event.type == UI::EVENT_BUTTON_PRESS) | ||
BigScope_instance.OnRightButtonPress(); | ||
|
||
// For up button, handle only press (long press is reserved) | ||
if (event.control == OC::CONTROL_BUTTON_UP) BigScope_instance.OnUpButtonPress(); | ||
|
||
// For down button, handle press and long press | ||
if (event.control == OC::CONTROL_BUTTON_DOWN) { | ||
if (event.type == UI::EVENT_BUTTON_PRESS) BigScope_instance.OnDownButtonPress(); | ||
if (event.type == UI::EVENT_BUTTON_LONG_PRESS) BigScope_instance.OnDownButtonLongPress(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pristine 🛀 Great Job!
Adding the the BigScope App
Adding the the BigScope App
Adding the BigScope App
Adding BigScope App – Changes from pull request Chysn#76 Changes from pull request Chysn#51 Changes from pull request Chysn#105 Changes from pull request Logarhythm1#2
Adding BigScope App – Changes from pull request Chysn#76 Changes from pull request Chysn#51 Changes from pull request Chysn#105 Changes from pull request Logarhythm1#2
First of all thank you for creating this amazing piece of software.
This pull request adds an App instead of an Applet for the Scope functionality.
I've created in the past a feature request for it #40,
but now can finally try to contribute.
The main motivation behind it is to use the entire screen.
how the appp works
Since the screen is already small as I user I wont use it for more than one channel.
Things to consider: